package com.quan.project.system.web.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.quan.common.base.bean.ResultBean;
import com.quan.common.biz.support.BaseController;
import com.quan.project.system.dto.ProjectGroupByStatus;
import com.quan.project.system.entity.IeasyOaProjectCenter;
import com.quan.project.system.service.IeasyOaProjectCenterService;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 杨浩泉
 * @since 2019-03-14
 */
@RestController
@RequestMapping("/oa/ieasy/project/center")
public class IeasyOaProjectCenterController extends BaseController {

    @Autowired 
    private IeasyOaProjectCenterService service;
    
    /**
     * 根据年份统计项目数量
     */
    @GetMapping(value = "/selectProjectGroupByYear")
    public Object selectProjectGroupByYear(IeasyOaProjectCenter entity) {
    	return ResultBean.ok(this.service.selectProjectGroupByYear());
    }
    
    /**
    * 根据项目状态分组统计
    */
    @GetMapping(value = "/selectProjectGroupByStatus")
    public Object selectProjectGroupByStatus(ProjectGroupByStatus entity) {
		return ResultBean.ok(this.service.selectProjectGroupByStatus());
    }

}
